package org.nox.helloseries.domain;

public enum Version
{

    VO( "" ), VOSTFR( "VOSTFR" ), VF( "FRENCH" );

    private String value;

    Version( String value )
    {
        this.value = value;
    }

    public String getValue()
    {
        return value;
    }

    public static Version fromValue( String value )
    {
        for ( Version version : values() )
        {
            if ( version.getValue().toLowerCase().equals( value.toLowerCase().trim() ) )
            {
                return version;
            }
        }
        // Valeur par défaut
        return null;
    }

    public boolean isVO()
    {
        return this.equals( VO );
    }

    public boolean isVOSTFR()
    {
        return this.equals( VOSTFR );
    }

    public boolean isVF()
    {
        return this.equals( VF );
    }

    public static String stringValues()
    {
        return new String( VOSTFR.getValue() + "|" + VF.getValue() );
    }
}
